package com.gitee.ly.model;

import lombok.Data;

@Data
public class RegistryBody {
    private String name;
    private String schema = "http";
    private String ip;
    private int port;
    private Boolean canUse = true;

    public ServiceInfo convertToServiceInfo() {
        ServiceInfo serviceInfo = new ServiceInfo();
        serviceInfo.setName(name);
        serviceInfo.setSchema(schema);
        serviceInfo.setIp(ip);
        serviceInfo.setPort(port);
        serviceInfo.setCanUse(canUse);
        return serviceInfo;
    }
}
